:root {
  --text-normal: hsl(0, 0%, 10%);
  --text-muted: hsl(220, 5%, 50%);
  --text-link: hsl(230, 60%, 50%);
  --text-link-hover: hsl(230, 80%, 60%);
  --header-primary: hsl(10, 75%, 20%);
  --header-secondary: hsl(40, 50%, 60%);
  --interactive-normal: hsl(120, 25%, 85%);
  --interactive-hover: hsl(120, 25%, 70%);
  --interactive-active: hsl(120, 15%, 70%);
  --interactive-muted: hsl(120, 15%, 60%);
  --blockquote-color: hsl(60, 40%, 80%);
  --table-green: hsl(70, 40%, 80%);
  --background-primary: hsl(0, 0%, 90%);
  --background-accent: hsl(60, 10%, 60);
  --background-secondary: hsl(0, 0%, 80%);
  --background-secondary-alt: hsl(0, 15%, 80%);
  --background-tertiary: hsl(55, 100%, 95%);
  --background-floating: hsl(0, 0%, 90%);
  --monster-yellow: hsl(40, 89%, 95%);
  --descriptive-yellow: hsl(50, 60%, 95%);
  --grey-background: hsla(0, 0%, 10%, 0.5);
}

html[data-theme="dark"],
html.dark {
  --text-normal: hsl(210, 5%, 90%);
  --text-link: hsl(230, 60%, 65%);
  --background-primary: hsl(240, 5%, 10%);
  --background-secondary: hsl(0, 0%, 20%);
  --background-tertiary: hsl(0, 0%, 15%);
  --blockquote-color: hsl(0, 0%, 20%);
  --interactive-normal: hsl(0, 0%, 25%);
  --interactive-hover: hsl(0, 0%, 40%);
  --header-primary: hsl(2, 55%, 50%);
  --header-secondary: hsl(40, 50%, 60%);
  --interactive-active: hsl(0, 20%, 40%);
  --interactive-hover: hsl(0, 25%, 45%);
  --interactive-muted: hsl(0, 50%, 25%);
  --table-green: hsl(70, 5%, 25%);
  --background-accent: hsl(0, 20%, 50%);

  /* --background-primary: #36093f;
  --background-secondary: #2f3136; */
  --background-secondary-alt: hsl(220, 7%, 17%);
  --background-tertiary: hsl(216, 7%, 14%);
  --background-floating: hsl(225, 8%, 10%);
  --descriptive-yellow: hsl(48, 11%, 25%);
}

body {
  color: var(--text-normal);
  font-family: Bookinsanity;
  font-size: 18px;
  margin-bottom: 4px;
  margin-top: 4px;
  background-color: var(--background-primary);
}

/* Different to .paper, .background-image repeats and covers everything. Paper will often have cutouts for illustrations. This does not. */
.background-image {
  background-image: url("./static/grunge-bottom-01.png");
  background-attachment: scroll;
  background-repeat: repeat;
  background-size: cover;
  z-index: -10;
  position: fixed;
  top: 0;
  width: 100%;
  bottom: 0;
}

html.dark .background-image {
  filter: invert(100%);
  -webkit-filter: invert(100%);
}

.paper {
  /* background-image: url("/static/grunge-top-01.png"); */
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  bottom: 0;
  z-index: -1;
}

html.dark .paper {
  filter: invert(100%);
}



nav {
  display: inline;
}

summary {
  display: block;
  cursor: pointer;
  font-size: 0.529cm;
  margin-bottom: 1rem;
  margin-top: 1rem;
  border-bottom: 3px solid var(--header-secondary);
  font-family: MrJeeves;
  font-weight: 800;
  color: var(--header-primary);
}

article {
  cursor: text;
}


.error-view[data-tags~="squash-errors"] {
  display: hidden;
}



.flex-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

#ui-dialog-body.settings button[id|="setting-control-nobutton"]::after {
  content: none;
}

/* Used for tooltips. */
.dotted {
  border-bottom: 1px dotted var(--text-normal);
  text-decoration: none;
  cursor: help;
}



img,
embed,
object,
video {
  max-width: 100%;
  min-width: auto;
}

#passages button {
  border-radius: 4px;
}

.no-indent {
  text-indent: 0;
}

.first-character {
  float: left;
  font-family: Solbera Imitation;
  font-size: 10em;
  color: var(--text-normal);
  line-height: 0.8em;
}

h1,
h2,
h3,
h4,
h6 {
  margin-top: 0.2em;
  margin-bottom: 0.2em;
  font-family: MrJeeves;
  font-weight: 800;
  color: var(--header-primary);
}

.town-name {
  display: block;
  column-span: none;
  font-size: 0.987cm;
  -webkit-column-span: none;
  -moz-column-span: none;
  border-bottom: 6px solid var(--header-secondary);
}

/* H1 */

h1 {
  display: block;
  column-span: all;
  font-size: 0.987cm;
  -webkit-column-span: all;
  -moz-column-span: all;
  border-bottom: 6px solid var(--header-secondary);
  margin-bottom: 0.4em;
}

/* H2 */

h2 {
  display: block;
  font-size: 0.705cm;
}

/* H3 */

h3 {
  display: block;
  font-size: 0.529cm;
  margin-bottom: 0em;
  border-bottom: 3px solid var(--header-secondary);
}

/* H4 */

h4 {
  display: block;
  margin-bottom: 0;
  margin-top: 10px;
  font-size: 0.458cm;
}

span.macro-linkreplace-insert {
  margin-top: 0;
  margin-bottom: 10px;
}
/* H5 */

h5 {
  display: block;
  margin-bottom: 0.2em;
  font-family: ScalySansSmallCaps;
  font-size: 0.423cm;
  font-weight: 900;
}

/* H6 */

h6 {
  display: block;
  font-size: 0.445cm;
  border-bottom: 1.25px solid var(--header-secondary);
}

/* ### Paragraphs */

/* P */

p {
  line-height: 1.75em;
}

p:empty {
  display: hidden;
}

/* P+P */

#passages p + p {
  margin-top: -0.8em;
}

/* Text Indentation */

#passages p + p,
#passages ul + p,
#passages ol + p {
  text-indent: 1em;
}

/* Text Decoration */

strong {
  font-weight: bold;
  letter-spacing: 0.03em;
}
em {
  font-style: italic;
}
sup {
  vertical-align: super;
  font-size: xx-small;
  line-height: 0;
}
sub {
  vertical-align: sub;
  font-size: smaller;
  line-height: 0;
}

/* First Letter after H1 */

h1 + p::first-letter {
  float: left;
  font-family: Solbera Imitation;
  font-size: 10em;
  color: var(--text-normal);
  line-height: 0.8em;
}

h1.town-name + p::first-letter {
  float: left;
  font-family: Solbera Imitation;
  font-size: 7em;
  color: var(--text-normal);
  line-height: 0.8em;
}

h1 + p::first-line {
  font-family: Scaly Sans Caps;
}

h1 + button + p::first-line {
  font-family: Scaly Sans Caps;
}

h1 + button + br + p::first-line {
  font-family: Scaly Sans Caps;
}

h1 + blockquote + p::first-line {
  font-family: Scaly Sans Caps;
}

h1 + button + blockquote + p::first-line {
  font-family: Scaly Sans Caps;
}

h1 + p button + blockquote + p::first-line {
  font-family: Scaly Sans Caps;
}

#passages .first-character + p + p {
  text-indent: 0;
}

.body:nth-child(even):after {
  transform: scaleX(-1);
}
.body:nth-child(even) .pageNumber {
  left: 2px;
}
.body:nth-child(even) .footnote {
  left: 80px;
  text-align: left;
}

/***********************************************************************
	BLEACHED - A largely white style for SugarCube â‰¥v2.23.1
***********************************************************************/


span.link-disabled {
  color: var(--background-accent);
}
button {
  margin-top: 20px;
  margin-bottom: 5px;
  color: var(--text-normal);
  background-color: var(--interactive-normal);
  border-width: 2px;
  border-color: var(--interactive-muted);
  border-style: inset;
}
button:hover {
  background-color: var(--interactive-hover);
  border-color: var(--header-secondary);
  transition: all 0.2s ease-in-out;
}
button:disabled {
  background-color: var(--background-muted);
  border-color: var(--background-tertiary);
}
input,
select,
textarea {
  margin-top: 20px;
  color: var(--text-normal);
  border-color: var(--header-secondary);
  border-width: 2px;
  border-style: inset;
  background-color: var(--background-primary);
}
input:not(:disabled):focus,
select:not(:disabled):focus,
textarea:not(:disabled):focus,
input:not(:disabled):hover,
select:not(:disabled):hover,
textarea:not(:disabled):hover {
  /* background-color: rgb(240, 217, 140);
	border-color: rgb(194, 160, 61); */
  background-color: var(--interactive-normal);
  border-color: var(--interactive-hover);
}
hr {
  border-color: rgb(41, 41, 41);
}
input#mce-EMAIL.required.email {
  border-color: rgb(99, 99, 99);
  border-style: solid;
  border-width: 1px;
}
input#mce-EMAIL.required.email:focus,
input#mce-EMAIL.required.email:hover {
  background-color: rgb(238, 238, 238);
}

.classTable {
  margin-top: 25px;
  margin-bottom: 40px;
  border-collapse: separate;
  background-color: var(--background-primary);
  border: initial;
  border-style: solid;
  border-image-outset: 25px 17px;
  border-image-repeat: round;
  border-image-slice: 150 200 150 200;
  border-image-source: url("./static/table-wrap.png");
  border-image-width: 47px;
}
.classTable h5 {
  margin-bottom: 10px;
}
